﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebCommit.Common.Interfaces;
using WebCommit.BizL.User;
using WebCommit.Common.Entitys;

namespace WebCommit.SvcL.User
{
	public class UserSvc:IUserSvc
	{
		private UserBiz userBiz = UserBiz.CurrentInstance;
		public bool IsUserNameExists(string userName)
		{
			return userBiz.IsUserNameExists(userName);
		}

		public bool IsNickNameExists(string nickName)
		{
			return userBiz.IsNickNameExists(nickName);
		}


		public void RegUser(Common.Entitys.UserEntity user)
		{
			userBiz.RegUser(user);
		}

		public void UpdateUser(Common.Entitys.UserEntity user)
		{
			userBiz.UpdateUser(user);
		}


		public UserEntity Login(string userName, string password)
		{
			return userBiz.Login(userName, password);
		}


		public UserEntity GetUserEntity(string userName)
		{
			return userBiz.GetUserEntity(userName);
		}


		public bool ValidateUser(RegValidateEntity regVal, ref object rtnObj)
		{
			return userBiz.ValidateUser(regVal,ref rtnObj);
		}

		public UserAttachEntity GetUserAttach(string userId)
		{
			return userBiz.GetUserAttach(userId);
		}


		public bool ReSendValidateMail(string email, string userId, string newEmail)
		{
			return userBiz.ReSendValidateMail(email, userId, newEmail);
		}

	}
}
